package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.dto.OrderQueryDto;
import com.csun.cmny.provider.model.domain.OmcOrder;
import com.csun.cmny.provider.vo.OrderDetailVo;
import com.csun.cmny.provider.vo.OrderVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface OmcOrderMapper extends Mapper<OmcOrder> {

    /**
     * 订单列表分页查询
     *
     * @param orderQueryDto order query dto
     *
     * @return  the list.
     */
    List<OrderVo> queryOrderListWithPage(OrderQueryDto orderQueryDto);

    /**
     * 待接单列表
     *
     * @param processInstanceIds    流程实例Id
     *
     * @return  the list
     */
    List<OrderVo> queryOrderListByProcessInstanceIds(@Param("processInstanceIds") List<String> processInstanceIds);

    /**
     * 根据Id查询订单信息
     *
     * @param id    id
     *
     * @return  the order vo
     */
    OrderDetailVo showOrderById(Long id);

    /**
     * 查询历史完成订单
     *
     * @param userId    user id
     *
     * @return
     */
    List<OrderVo> showOrderHisFnsd(@Param("userId") Long userId, @Param("statList") List<Integer> statList);
    //查询服务时长
    Integer selectServiceTime(@Param("groupIdList") List<Long> groupIdList);
}